	<div style="padding: 3px 14px;">
		<form class="frm1" id="form" action="<?php echo base_url($lang_url).(empty($lang_url) ? '' : '/'); ?>panel/series/admin" method="POST">
			<input type="text" class="size90" name="busqueda" value="" placeholder="Nombre de la Serie" maxlength="100"/>
			<!-- <a href="javascript:void(0);" id="submit" class="button save"><?php echo lang('txt_button_search'); ?></a> -->
		</form>
	</div>	

	<?php  if(isset($list)){
		$this->pagination->initialize(array(
			'base_url' 			=> Sys::$url_base.$this->uri->uri_string().'/',
			'total_rows'		=> $list['total_rows'],
			'per_page'			=> $list['items_per_page'],
			'cur_page'			=> $list['result_page']*$list['items_per_page'],
			'page_query_string'	=> TRUE,
			'num_links'			=> 1,
			'anchor_class'		=> 'pags corner-all'
		));
		// echo '<pre>';
		// var_dump($list);
		// echo '</pre>';
		$pagination = $this->pagination->create_links();
		// echo '<div class="pagination w100">'.$pagination.'</div>';
	?>
		<ul id="tree">
			
			<!-- SERIES -->
			<?php foreach($list['series'] as $key => $serie){ ?>
				<li class="no-padding no-margin">
					<span class="title-serie"><?php echo $serie['titulo'];?>
						 <a href="<?php echo base_url($lang_url).(empty($lang_url) ? '' : '/');?>panel/series/edit_serie/<?php echo $serie['id_serie'];?>" class="button up float-r" title="Editar Serie">&nbsp;</a>
						 <a href="<?php echo base_url($lang_url).(empty($lang_url) ? '' : '/');?>panel/series/add_season/<?php echo $serie['id_serie'];?>" class="button add pdd-lft float-r" title="Agregar Temporada">&nbsp;</a>
					</span>
					
					<!-- TEMPORADAS -->
					<?php foreach($list['series'][$key]['tem_epi'] as $season){ 
						
						if($season['type'] == 'temporada'){
					
					?>
						<ul class="no-margin no-padding">
							<li class="no-margin pdd-season">
								<span class="title-season"><?php echo $season['titulo']; ?>
									<a href="<?php echo base_url($lang_url).(empty($lang_url) ? '' : '/');?>panel/series/edit_season/<?php echo $season['id_temporada'];?>" class="button up float-r" title="Editar Temporada">&nbsp;</a>
							 		<a href="<?php echo base_url($lang_url).(empty($lang_url) ? '' : '/');?>panel/series/add_episode/<?php echo $season['id_temporada'];?>" class="button add pdd-lft float-r" title="Agregar Episodio">&nbsp;</a>
							 		<a href="<?php echo base_url($lang_url).(empty($lang_url) ? '' : '/');?>panel/series/all-episodes/<?php echo $season['id_temporada'];?>" class="button flag pdd-lft float-r" title="Episodios Proximos" rel="superbox[iframe][900x500]">&nbsp;</a>
								</span>
								
								
								<!-- EPISODIOS -->
								<?php foreach($list['series'][$key]['tem_epi'] as $episode){ 
						
									if($episode['type'] == 'episodio' && $episode['id_temporada'] == $season['id_temporada']){
								
								?>
									<ul class="no-margin no-padding">
										<li class="no-margin pdd-episode">
											<span class="title-episode"><?php echo $episode['titulo']  ?>
												<a href="<?php echo base_url($lang_url).(empty($lang_url) ? '' : '/');?>panel/series/edit_episode/<?php echo $episode['id_capitulo'];?>" class="button up float-r" title="Editar Episodio">&nbsp;</a>
											</span>
										</li>
										
									</ul>
								
								<?php }} ?>
							</li>
						</ul>
						
					<?php }} ?>
				</li>
			<?php } ?>
			
		</ul>
	<?php echo '<div class="pagination w100">'.$pagination.'</div>';}?>